package com.example.attrimirror.ui.combine;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.example.attrimirror.databinding.FragmentCombineBinding;

public class CombineFragment extends Fragment {
    private FragmentCombineBinding binding;
    private CombineRecipeAdapter adapter;

    @Override
    public View onCreateView(@NonNull LayoutInflater inflater,
            ViewGroup container, Bundle savedInstanceState) {
        binding = FragmentCombineBinding.inflate(inflater, container, false);
        View root = binding.getRoot();

        RecyclerView recyclerView = binding.recyclerCombine;
        recyclerView.setLayoutManager(new LinearLayoutManager(requireContext()));
        adapter = new CombineRecipeAdapter(requireContext());
        recyclerView.setAdapter(adapter);

        return root;
    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        binding = null;
    }
} 